import request from '@/utils/request'

// 查询供应商信息列表
export function listBaseSupplier (query) {
  return request({
    url: '/baseinfo/baseSupplier/list',
    method: 'get',
    params: query
  })
}

// 查询供应商信息详细
export function getBaseSupplier (id) {
  return request({
    url: '/baseinfo/baseSupplier/' + id,
    method: 'get'
  })
}

// 新增供应商信息
export function addBaseSupplier (data) {
  return request({
    url: '/baseinfo/baseSupplier',
    method: 'post',
    data: data
  })
}

// 修改供应商信息
export function updateBaseSupplier (data) {
  return request({
    url: '/baseinfo/baseSupplier',
    method: 'put',
    data: data
  })
}

// 删除供应商信息
export function delBaseSupplier (id) {
  return request({
    url: '/baseinfo/baseSupplier/' + id,
    method: 'delete'
  })
}

// 导出供应商信息
export function exportBaseSupplier (query) {
  return request({
    url: '/baseinfo/baseSupplier/export',
    method: 'get',
    params: query
  })
}

// 获取初始化数据
export function getInitData (dictTypes) {
  return request({
    url: '/baseinfo/baseSupplier/getInitData/' + dictTypes,
    method: 'get'
  })
}
